package xyz.zhzby.cyzx.oj.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;

import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import xyz.zhzby.cyzx.servicebase.domain.DataLogInfo;

/**
 * <p>
 * 评测记录
 * </p>
 *
 * @author zby
 * @since 2021-12-26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("oj_submission")
@ApiModel(value="Submission对象", description="评测记录")
public class Submission extends DataLogInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty(value = "类型（0测试 1评测）")
    @TableField("type")
    private int type;

    @ApiModelProperty(value = "试题ID")
    @TableField("problem_id")
    private Long problemId;

    @ApiModelProperty(value = "提交者ID")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "试题页面ID")
    @TableField("page_id")
    private Long pageId;

    @ApiModelProperty(value = "所用语言ID")
    @TableField("language_id")
    private Long languageId;

    @ApiModelProperty(value = "提交时间")
    @TableField("submit_time")
    private Date submitTime;

    @ApiModelProperty(value = "开始运行时间")
    @TableField("execute_time")
    private Date executeTime;

    @ApiModelProperty(value = "评测运行总时间")
    @TableField("used_time")
    private Integer usedTime;

    @ApiModelProperty(value = "评测运行占用最大内容")
    @TableField("used_memory")
    private Integer usedMemory;

    @ApiModelProperty(value = "结果")
    @TableField("judge_result")
    private String judgeResult;

    @ApiModelProperty(value = "分数")
    @TableField("judge_score")
    private Integer judgeScore;

    @ApiModelProperty(value = "日志")
    @TableField("judge_log")
    private String judgeLog;

    @ApiModelProperty(value = "提交的代码")
    @TableField("code")
    private String code;


}
